package com.bwhx.eruler.service.impl;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bwhx.eruler.bean.Department;
import com.bwhx.eruler.bean.Page;
import com.bwhx.eruler.dao.DepartmentDao;
import com.bwhx.eruler.service.DepartmentService;

/**
 * @Description:
 */
@Service
public class DepartmentServiceImpl implements DepartmentService {
	@Autowired 
	DepartmentDao deptDao;

	//带条件查询
	public List<Department> find(Department dept) {
		return deptDao.find(dept);
	}

	
	public Department get(Serializable dId) {
		// TODO Auto-generated method stub
		return deptDao.get(dId);
	}

	
	public void insert(Department dept) {
		deptDao.insert(dept);
		
	}

	
	public void update(Department dept) {
		deptDao.update(dept);
		
	}

	
	public void delete(Serializable id) {

		deptDao.delete(id);
		
	}

	
	public void delete(Serializable[] ids) {
		// TODO Auto-generated method stub
		
	}


	@Override
	public List<Department> findByName(String deptname) {
		
		return deptDao.findByName(deptname);
	}


	@Override
	public void inputDepartment(Department d) {
		deptDao.inputDepartment(d);		
	}


	@Override
	public List<Department> list(Page p) {
		return deptDao.list(p);
	}


	@Override
	public Integer count(Department d) {
		return deptDao.count(d);

	}


	@Override
	public List<Department> deptListAll() {
		return deptDao.deptListAll();
	}


	@Override
	public void del(String dId) {
		deptDao.del(dId);		
	}

}
